<template>
    <router-view />
</template>

<script setup>
import {useNewsStore} from '@/store/news'
const newsStore = useNewsStore()
const timer = ref(null)

onMounted(() => {
  newsStore.getOrderNotify()
    // 定时获取消息通知
  timer.value = setInterval(() => {
    newsStore.getOrderNotify()
  }, 1000 * 30)
})

onUnmounted(() => {
  clearInterval(timer.value)
})


</script>

<style>

</style>
